onSharedElementsArrived

open fun onSharedElementsArrived(sharedElementNames: List<String>, sharedElements: List<View>, listener: SharedElementCallback.OnSharedElementsReadyListener)(source)

Called during an Activity Transition when the shared elements have arrived at the final location and are ready to be transferred. This method is called for both the source and destination Activities.

When the shared elements are ready to be transferred, onSharedElementsReady must be called to trigger the transfer.

The default behavior is to trigger the transfer immediately.

Parameters

sharedElementNames

The names of the shared elements that are being transferred..

sharedElements

The shared elements that are part of the View hierarchy.

listener

The listener to call when the shared elements are ready to be hidden in the source Activity or shown in the destination Activity.